package com.tpc.jginterface;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
public class JgInterfaceApplication {

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(JgInterfaceApplication.class);

        // 添加关闭钩子
        Runtime.getRuntime().addShutdownHook(new Thread(() -> {
            // 在这里添加清理代码
            System.out.println("Application is shutting down...");
        }));

        app.run(args);
    }

}
